#ifndef THREADED_PROGRESS_EXAMPLE_H
#define THREADED_PROGRESS_EXAMPLE_H

#include <QWidget>

class QProgressBar;
class QPushButton;
class QLabel;
class WorkerThread;

class ThreadedProgressExample : public QWidget
{
    Q_OBJECT

public:
    explicit ThreadedProgressExample(QWidget* parent = nullptr);
    ~ThreadedProgressExample();

private slots:
    void startThreadedTask();
    void stopThreadedTask();
    void onTaskCompleted(const QString& message);
    void onTaskError(const QString& error);

private:
    void setupUI();
    void setupConnections();

    QProgressBar* progressBar;
    QPushButton* startButton;
    QPushButton* stopButton;
    QLabel* statusLabel;
    WorkerThread* workerThread;
};

#endif // THREADED_PROGRESS_EXAMPLE_H